// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import layer from 'vue-layer'
import 'vue-layer/lib/vue-layer.css';
Vue.prototype.$layer = layer(Vue);


//引入Vuex
import Vuex from 'vuex'

import store from "./common/store/index.js"

// 修改API和推送接口
import svcInvoke from "./common/svcinvoke"
// Vue.use(svcInvoke, 'https://www.jfdjiue.xyz/api/', {});
Vue.use(svcInvoke, 'http://test.saiqi168.top/api/', {});

import socket from './common/websocket.js';
// Vue.use(socket, 'wss://www.jfdjiue.xyz/wss');
// Vue.use(socket, 'wss://test.saiqi168.top/wss');
Vue.use(socket, 'ws://test.saiqi168.top:30001');


//引入多语言
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n=new VueI18n({
  locale: 'zh',
  //this.$i18n.locale // 通过切换locale的值来实现语言切换
  messages: {//引入语言包
    'zh': require('./lang/zh'),   // 中文语言包
    'en': require('./lang/en'),    // 英文语言包
  },
  silentTranslationWarn: true
})







// 引入Mint UI全部组件
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)


//引入lib-flexible
import 'babel-polyfill'
import 'lib-flexible/flexible'


import echarts from 'echarts'
import jquery from 'jquery';
import Kline from 'kline';



Vue.prototype.$kline = Kline;
Vue.prototype.echarts = echarts;
Vue.config.productionTip = false;
window.$ = jquery;

window.$store = Vue.prototype.$store = store;

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  i18n,
  components: {
    App
  },
  template: '<App/>'
})

//非父子
export default new Vue()
